/*
    file.h
        Define the set of file
    BeginnerC
*/
#ifndef FILE_H
#define FILE_H
#include <stdbool.h>
/* Transform relative path to absolute path */
char* ToAbsolutePath(char *relative_path);
/* Create a directory  */
int CreateDirectory(const char *directory_name);
/* Judge a file is or not exist */
bool FileExists(const char *file_name);
/* Get the file name by full path */
char* GetFileName(char *file_name);
/* Move a directory */
int MoveDirectory(const char *src_path, const char *dest_path);
/* Delete a directory */
int DeleteDirectory(const char *path);
/* Copy a directory */
int CopyDirectory(const char *src_path, const char *dest_path);
/* List a Directory's file */
int ListDirectoryFile(const char *root_path, void (*handle)(const char *root_path, const char *file_name, int type, void *ext_argument), void *ext_argument);
/* Traverse a Directory */
int TraverseDirectory(const char *root_path, void (*handle)(const char *root_path, const char *file_name, int type, void *ext_argument), void *ext_argument);
/* Move a file */
int MoveFile(const char *src_path, const char *dest_path);
/* Copy a file */
int CopyFile(const char *src_path, const char *dest_path);
/* Write new content to a file */
int WriteFile(const char *file_name, char *content, unsigned size);
/* Load the file full content to the buffer */
char* ReadFileContent(const char *file_name);
/* Judge a path is or not a absolute path */
bool IsAbsolutePath(const char *file_name);
/* Get the program current absolute path */
char* GetProcPath();
#endif